package com.shycloud.mido.music.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shycloud.mido.music.domain.MisUserCollection;
import com.shycloud.mido.music.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MisUserCollectionMapper extends BaseMapper<MisUserCollection> {

	/**
	 * 查看我收藏的曲集
	 *
	 * @param page
	 * @param memberId
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.shycloud.mido.music.vo.MyCollectionVO>
	 * @author nianhua.jiang
	 * @date 2020/6/16 15:36
	 */
	IPage<UserCollectionVO> getUserCollection(@Param("page") Page page, @Param("memberId") String memberId);

	/**
	 * 获取有声图书列表
	 *
	 * @param page
	 * @param memberId
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.shycloud.mido.music.vo.MyCollectionVO>
	 * @author nianhua.jiang
	 * @date 2020/6/16 17:05
	 */
	IPage<MyCollectionVO> getMySoundBook(@Param("page") Page page, @Param("memberId") String memberId);

	/**
	 * 获取定制曲集列表
	 *
	 * @param page
	 * @param memberId
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.shycloud.mido.music.vo.UserCollectionVO>
	 * @author nianhua.jiang
	 * @date 2020/7/6 16:54
	 */
	IPage<UserCollectionVO> getUserCollectionIsCustom(@Param("page") Page page, @Param("memberId") String memberId);

	Integer getCount(@Param("memberId") String memberId);

	List<AddMusicVO> getUserCollectionForAddMusicPage(@Param("memberId") String memberId);

	List<MyCollectionVO> getUserCollectionByMini(@Param("searchWord") String searchWord, @Param("memberId") String memberId);

	List<CollCourseWareVO> getUserCollectionCourseWare(@Param("memberId") String memberId);

	List<CollCourseWareVO> getFolderListAll(@Param("id") String id);

	List<CollCourseWareVO> getFolderList(@Param("groupId") Integer groupId);

	@SqlParser(filter = true)
	IPage<CoursewareDetailVO> getCoursewareForCourseWare(@Param("page") Page page, @Param("id") Integer id, @Param("teacherId") String teacherId, @Param("studentId") String studentId);
}